package com.hellobike.haxing.modules.address.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hellobike.haxing.modules.address.entity.TKV;
import com.hellobike.haxing.modules.address.entity.TProvince;
import com.hellobike.haxing.modules.address.mapper.TProvinceMapper;
import com.hellobike.haxing.modules.address.service.ITProvinceService;
import com.hellobike.haxing.modules.address.util.Convert2KV;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: t_province
 * @Author: haxing-boot
 * @Date:   2020-02-05
 * @Version: V1.0
 */
@Service
public class TProvinceServiceImpl extends ServiceImpl<TProvinceMapper, TProvince> implements ITProvinceService {

    @Override
    public List<TKV> getAllProvinces(){
        QueryWrapper<TProvince> queryWrapper = new QueryWrapper<>();
        return Convert2KV.provine2kv(baseMapper.selectList(queryWrapper));
    }
}
